#设置玩家最大生命值为40
clear @s
effect clear @s
gamemode adventure @s
attribute @s generic.max_health base set 40
effect give @s instant_health 1 9 true

#系统内容
scoreboard players set @s SystemJoin 1
scoreboard players set @s SystemBuyHero 0
scoreboard players set @s SystemCancelBuy 0
scoreboard players set @s SystemComKill 0
scoreboard players set @s SystemNotAround 15
scoreboard players set @s SystemOutItem 0
tag @s remove PERjoinmap
tag @s remove AirBorning
scoreboard players set @s SystemSneak 0

## 清空玩家触发器
# scoreboard players set @s SystemMenu 0
# scoreboard players set @s SystemAdmin 0
# scoreboard players set @s SystemGift 0
# scoreboard players set @s BossMenu 0
scoreboard players set @s DieOutTrigger 0


#大逃杀游戏 如果未在大逃杀游戏中则执行清除玩家的DieOutSelectFinish标签
execute unless score IsTheDieOutGame SystemAdmin matches 1.. run tag @s remove DieOutSelectFinish
execute unless score IsTheDieOutGame SystemAdmin matches 1.. run tag @s remove DieOutWatch
execute unless score IsTheDieOutGame SystemAdmin matches 1.. run tag @s remove DieOutAgree

#逢魔时刻
tag @s remove BossSelectFinish
tag @s remove BossAlready
tag @s remove BOSSselect

##旧版计分板替换
#skHealth skHealth
#CDAaAaAa   skCDEgg
#AaAaAa     skEgg
#CDAaAa     skCDEXBottle
#AaAa       skEXBottle
#CDAa       skCDPearl
#Aa         skPearl
#@s snowball   skSnowball
#CDxueqiu   skCDSnowball

#ZhanDou    skZhanDouState
#ShouShang  skShouShang1 skShouShang2 skShouShang3 
#CDJPG      skCDJPG
#JPG        skJPG

#CDentity   skCDEntity
#CDentity1  skCDEntity1

#CDplayer   skCDPlayer
#CDplayer1   skCDPlayer1

#SystemPlayer skPlayer
#TimeKe     skTimeKe


#清空技能特殊效果
scoreboard players set @s EFing -1
scoreboard players set @s EFUnControl 0
scoreboard players set @s EFReborn 0
scoreboard players set @s EFLock 0
scoreboard players set @s EFDizzy 0
scoreboard players set @s EFLocks 0
scoreboard players set @s EFDisarm 0

#攻击 受伤 战斗状态 跳跃 击杀 死亡
scoreboard players set @s skShangHaiState 0
scoreboard players set @s skShouShangState 0
scoreboard players set @s skZhanDouState 0
scoreboard players set @s skJump 0
scoreboard players set @s skKill 0
scoreboard players set @s skDie 0
#对玩家造成伤害 受伤/吸收/抵挡 伤害
scoreboard players set @s skShangHai 0
scoreboard players set @s skShouShang1 0
scoreboard players set @s skShouShang2 0
scoreboard players set @s skShouShang3 0
#疾跑距离 走路距离 飞行 飞行距离 潜行 潜行时间
scoreboard players set @s skRunDistance 0
scoreboard players set @s skWalkDistance 0
scoreboard players set @s skFly 0
scoreboard players set @s skFlyDistance 0
scoreboard players set @s skSneak 0
scoreboard players set @s skSneakTime 0

#清空技能CD及使用情况
scoreboard players reset @s TimeKe

#个别英雄技能储存
scoreboard players set @s skPlayer 0

#5种主要技能CD
scoreboard players set @s skEXBottle 0
scoreboard players set @s skPearl 0
scoreboard players set @s skEgg 0
scoreboard players set @s skJPG 0
scoreboard players set @s skSnowball 0

scoreboard players set @s skCDEXBottle 0
scoreboard players set @s skCDPearl 0
scoreboard players set @s skCDEgg 0
scoreboard players set @s skCDJPG 0
scoreboard players set @s skCDSnowball 0

#其他技能CD
scoreboard players set @s skCDPlayer 0
scoreboard players set @s skCDPlayer1 0
scoreboard players set @s skCDEntity 0
scoreboard players set @s skCDEntity1 0
scoreboard players set @s skCDKe 0



#武器
scoreboard players set @s skWooden_sword0 0
scoreboard players set @s skStone_sword0 0
scoreboard players set @s skGolden_sword0 0
scoreboard players set @s skIron_sword0 0
scoreboard players set @s Diamond_sword0 0

scoreboard players set @s skIron_shovel0 0
scoreboard players set @s skGolden_shovel0 0
scoreboard players set @s skIron_axe0 0

scoreboard players set @s skWooden_sword1 0
scoreboard players set @s skStone_sword1 0
scoreboard players set @s skGolden_sword1 0
scoreboard players set @s skIron_sword1 0
scoreboard players set @s Diamond_sword1 0
scoreboard players set @s skIron_axe1 0
scoreboard players set @s skGolden_axe1 0


scoreboard players set @s skTrident0 0
scoreboard players set @s skShield0 0
scoreboard players set @s skShield000 0
scoreboard players set @s skShield1 0


scoreboard players set @s skBow0 0
scoreboard players set @s skBow1 0
scoreboard players set @s skFashi0 0
scoreboard players set @s skCrossBow0 0
scoreboard players set @s skCrossBow1 0

#第一英雄大厅
tag @s remove xiao
execute as @e[type=phantom] if score @s DataID = @a[tag=lingying,limit=1,scores={SystemDeath=1..,EFReborn=0}] DataID run kill @s
tag @s remove lingying
tag @s remove zzsn
scoreboard players set @s ZuoZhu1 0
tag @s remove shinai
tag @s remove juji
tag @s remove jujifinish
tag @s remove shouqiang
tag @s remove laiwei
tag @s remove haidao
tag @s remove yasuo
scoreboard players set @s yasuo2 1
scoreboard players set @s yasuo3 -1
tag @s remove waerte
tag @s remove aijisi
scoreboard players set @s yingdunbing5 0
tag @s remove xueya
tag @s remove weide
scoreboard players set @s yimo5 0

#第二英雄大厅所有英雄清空分数
tag @s remove panshi
tag @s remove mieshang
execute as @e[type=armor_stand,tag=zuoxuWeixing] at @s if score @s DataID = @a[tag=zuoxu,limit=1,scores={SystemDeath=1..,EFReborn=0}] DataID run function nw:yingxiong/2yingxiong/03zuoxu/skill/05weixingkill
execute as @e[type=armor_stand,tag=zuoxuZuobiao] at @s if score @s DataID = @a[tag=zuoxu,limit=1,scores={SystemDeath=1..,EFReborn=0}] DataID run function nw:yingxiong/2yingxiong/03zuoxu/skill/04zuobiaokill
tag @s remove zuoxu
scoreboard players set @s mieshang5 0
# tag @s remove aixi
# scoreboard players set @s aixi1 0
# scoreboard players set @s aixi4 0
tag @s remove yifuer
tag @s remove yao
scoreboard players set @s ling1 0
tag @s remove meiqin
tag @s remove qiaoyisi
tag @s remove mingge
tag @s remove shanling
scoreboard players set @s shanling5 0
tag @s remove mengyan
scoreboard players set @s mengyan5 0


#第三英雄大厅所有英雄清空分数
# tag @s remove xiu
tag @s remove erhan
tag @s remove wofu
tag @s remove akeer
tag @s remove daoshaolin
scoreboard players set @s daoshaolin2 0
tag @s remove jueling
tag @s remove xingchen
scoreboard players set @s xingchen5 0
# tag @s remove huihui
# scoreboard players set @s huihui1 0
# scoreboard players set @s huihui5 80
tag @s remove weiersen
scoreboard players set @s shihuangzhe5 0
tag @s remove lieshou
tag @s remove qishi
scoreboard players set @s qishi1 0
tag @s remove miyan
scoreboard players set @s miyan1 0

#第四英雄大厅
tag @s remove xingyue



##TODO：以上数据复制更改即可————————————————————————————————————————————————————————————————————

#逢魔时刻：Boss英雄
tag @s remove BOSSmieshang
tag @s remove BOSSxiu

#BOSS英雄计分板
scoreboard players set @s BOSSmieshang5 0